<?php

namespace App\Repository;
/**
 * 基础数据存储类
 *
 * @author: WangBin
 * @date: 2021/9/19
 * @mail: <849850352@qq.com>
 */
class BaseRepository
{
    protected static $instance = [];
    public function __construct(){}
    public function __clone(){}

    public static function getInstance()
    {
        if((static::$instance[static::class] ?? []) instanceof static) {
            return static::$instance[static::class];
        }
        return static::$instance[static::class] = new static();
    }
}